from fastapi import APIRouter

from service.video_service import VideoService

router = APIRouter()

video_service = VideoService()
@router.get("/api/video/{vodeo_id}")
def get_all_video_data(vodeo_id):
    """
    采集全部视频数据
    :return:
    """
    video_service.get_video_info(video_id=vodeo_id)

@router.get("/api/image/{image_id}")
def check_task_video_exists(image_id):
    pass


@router.delete("/api/video/delete/{video_id}")
def delete_video_file(video_id):
    video_service.delete_video(video_id=video_id)

@router.delete("/api/video/delete_all")
def delete_video_file(video_ids_str):
    """
    批量删除
    :param video_ids:
    :return:
    """
    if not video_ids_str:
        video_ids = list(video_ids_str)
        for video_id in video_ids:
            video_service.delete_video(video_id=video_id)

